<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户添加</title>
#include("../jscss.html")
<script type="text/javascript">
	$(function(){
		$('#submit').click(function(){
			 $('#ff').form('submit',
				 {
				 url:'insert',
				 onSubmit: function(){
					var isValid = $(this).form('validate');
					if (!isValid){
						return false;
					}else{
						$('#ff').submit();
						return false
					}
				}
			 });
		});
	});
	$(function(){
		$('#back').click(function(){
			window.location.replace('list');
		});
	});
	$(function(){
		var errMsg = "#(errMsg??0)";
		if(errMsg != 0){
			$.messager.alert("提醒",errMsg);
		}
	});
	$(function(){
		$('#network').combobox({
    	url:'networkList',
    	valueField:'id',
    	textField:'network'
});
	})
</script>
</head>
<body>
        <div id="f-container">
		<h2>用户添加</h2>
        <form id="ff" method="post" action="insert">
            <table cellpadding="5">
                <tr>
                    <td class="field">角色：</td>
                    <td>
	                    <select id="role" class="easyui-combobox" name="userinfo.role" style="width:175px;">
						    <option value="1" >银行网点员工</option>
						    <option value="2">银行分行员工</option>
						    <option value="3">邮政揽投部</option>
						    <option value="4">分拨中心</option>
						    <option value="5">邮政揽投员</option>
						    <option value="6">银行管理员</option>
						    <option value="7">邮政管理员</option>
						</select>
					</td>
                    <td class="field">归属：</td>
                    <td>
	                    <select id="role" class="easyui-combobox" name="userinfo.bank" style="width:175px;">
						    <option value="1">邮政</option>
						    <option value="2">交通银行</option>
						    <option value="3">农业银行</option>
						    <option value="4">建设银行</option>
						</select>
                    </td>
                </tr>
                <tr>
                    <td class="field">工号：</td>
                    <td>
                    	<input class="easyui-textbox" type="text" name="userinfo.employeeID" data-options="required:true"></input>
                    </td>
                    <td class="field">密码：</td>
                    <td>
                       <input class="easyui-textbox" type="text" name="userinfo.password" data-options="required:true" ></input>
                    </td>
                </tr>
                <tr>
                    <td class="field">网点：</td>
                    <td><input id="network" name="userinfo.networkID" value="" data-options="required:true"></input></td>
                    <td class="field">部门：</td>
                    <td><input class="easyui-textbox" type="text" name="userinfo.department" ></input></td>
                </tr>
                <tr>   
                    <td class="field">姓名：</td>
                    <td><input class="easyui-textbox" type="text" name="userinfo.name" data-options="required:true"></input></td>
                     <td class="field">电话：</td> 
                      <td><input class="easyui-numberbox" type="text" name="userinfo.telephone" data-options="required:true"></input></td>
                </tr>
            </table>
        </form>
        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'" id="submit">保存</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" id="back" data-options="iconCls:'icon-undo'">返回列表</a>
        </div>
        </div>
</body>
</html>